/* ****************************************************************
   ****************************************************************
   * Com++ Professional (c) 2009 C++ World
   * http://www.cplusplusworld.com/ mailto:compp@cplusplusworld.com
   ****************************************************************
   ****************************************************************
*/

#ifndef _GMUTEX_H
#define _GMUTEX_H


namespace compp {
class Mutex {
protected:
	pthread_mutex_t MutexId;

public:
	Mutex();
	virtual ~Mutex();
	bool Lock();
	bool TryLock();
	bool UnLock();
};



 class CriticalSection {
 public:
   CriticalSection ( Mutex & M  );
   virtual ~CriticalSection();
   
 protected:
   Mutex *mMutex;

 };

}


#endif

